<template>
	<view>
		<view :class="'custom-message ' + (isMine ? 'my-custom' : '')">
			这里是自定义消息{{message.payload.data}}{{isMine}}
		</view>
		<view class="">
			<view class="">
				
			</view>
		</view>
	</view>
</template>

<script>
	import {
		formateTime
	} from '../../../base/common.js';
	export default {
		data() {
			return {
				datainfo:{}
			};
		},
		components: {},
		props: {
			message: {
				type: Object,
				default: () => {}
			},
			isMine: {
				type: Boolean,
				default: true
			}
		},
		watch: {
			message: {
				handler: function(newVal) {
					this.setData({
						message: newVal,
						renderDom: this.parseCustom(newVal)
					});
				},
				immediate: true,
				deep: true
			}
		},
		methods: {
			parseCustom(message) {
				let extension = JSON.parse(message.payload.extension)
				console.log(extension,message, '222222222222-----------------------')
			}
		}
	};
</script>
<style>
	@import './index.css';
</style>